<include file="Public:head" title="邮箱记录"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <include file="Public:left" />
        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li><i class="icon-home home-icon"></i><a href="__APP__/{$Think.MODULE_NAME}">首页</a></li>
                    <li><a href="{:U('Communications/email')}">邮箱管理</a></li>
                    <li class="active">邮箱记录</li>
                </ul>
            </div>
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="row">
                            <div class="col-xs-12">

                                <notempty name='lists'>
                                    <div class="table-responsive">
                                        <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                            <thead>
                                                <tr>
                                                    <th class="center" width='45px'>
                                                        <label>
                                                            <input type="checkbox" class="ace"  autocomplete="off"/>
                                                            <span class="lbl"></span>
                                                        </label>
                                                    </th>
                                                    <th width='45px' class="center">ID</th>
                                                       <th width="250px">标题</th>
                                                    <th width="150px">邮箱</th>
                                                    <th>发送内容</th>
                                                    <th width="300px">错误日志</th>
                                                    <th width="130px">发送邮箱</th>
                                                    <th width="65px">时间</th>
                                                    <th width="130px">二次发送</th>
                                                     <th width="90px">操作</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                            <foreach name="lists" item="row">
                                                <tr>
                                                    <td class="center">
                                                        <label><input type="checkbox" class="ace" name="ids" value="{$row.id}" autocomplete="off" /><span class="lbl"></span></label>
                                                    </td>
                                                    <td class="center">{$row.id}</td>
                                                      <td style="text-align: left">{$row.title}</td>
                                                    <td style="text-align: left">
                                                        {$row.accounts}
                                                    </td>
                                                    <td style="text-align: left">{$row.content}</td>
                                                      <td style="text-align: left"><if condition="$row.error eq 'ok'"><span class='green'>{$row.error}</span><else/>{$row.error}</if></td>
                                       
                                                    <td>{$row.email_from}</td>
                                                <td>{$row.log_time}</td>
                                                    <td>{$row.second_email_from} 
                                                  
                                                    <p><if condition="$row.second_result eq 'ok'"><span class='green'>{$row.second_result}</span><else/>{$row.second_result}</if></p></td>
                                                <td class="action-buttons">
                                                    <a onclick="send_no('{$row.id}')">发送邮件</a>
<!--                                                    <a class="red" data-toggle="modal"  onclick="targetDelTable('{$row.id}')" data-rel="tooltip" data-original-title="删除"><i class="icon-trash bigger-130"></i></a>-->
                                                </td>
                                                </tr>
                                            </foreach>
                                            </tbody>
                                        </table>

                                    </div>
                                    <div id="grid-pager" class="ui-state-default  ui-corner-bottom" dir="ltr">
                                        <table width='100%' data-table='email_record'  id='modal_del_table'>
                                            <tr>
                                                <td>
                                                    <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
                                                        
                                                        <a class="red" data-toggle="modal" onclick="targetDelTable(0)"  data-rel="tooltip" data-original-title="批量删除">
                                                            <i class="icon-trash bigger-130"></i>
                                                        </a>
                                                    </div>
                                                </td>
                                                <td class='td_pager'><div class='pager'>{$page}</div></td>
                                            </tr>
                                        </table>
                                    </div>
                                    <else/>
<!--                                    <p class='noempty'>没有符合条件的记录,立即<a href="{:U('Communications/email_more')}">发送</a></p>-->
                                </notempty>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <include file="Public:setting" />
    </div>
</div>
<include file="Public:del" />
<include file="Public:foot" />
<script>
    function send_no(id) {
        $.post("{:U('Communications/send_no')}", {id:id}, function(data) {
            alert(data);
        })
    }
    </script>